#ifndef _YEP_ENGINE_DRAW_HANDLER_HPP
#define _YEP_ENGINE_DRAW_HANDLER_HPP

#include "../common.hpp"
#include "../math/Vector2.hpp"

namespace yep
{
    class DrawEvent;

    /**
     * @brief An object that can draw itseld on a Scene
     **/
    class DrawHandler
    {
    public:
        /**
         * @brief Virtual Destructor. To avoid warnings
         **/
        virtual ~DrawHandler(){}

        /**
         * @brief Must return the depth. Objects with larger depth will be drawn first
         *  and can be shaded by others witch have lesser depth.
         **/
        virtual double getDepth() = 0;

        /**
         * @brief Returns the topLeft position.
         *
         * It is used to determinate if it is inside the screen area.
         *  The object @b must be totally inside the Areaangle [topLeft,bottomRight).
         *  And this Areaangle @b should be the smallest Areaangle to do it.
         *  The complete equation is that pseudo-code:
         * @code
         *  bool needToDraw = bottomRight > viewPosition && topLeft < viewPosition+viewSize.
         * @endcode
         **/
        virtual Vector2 getTopLeft() = 0;

        /**
         * @brief Return the bottom right position.
         *
         * @see topLeft().
         **/
        virtual Vector2 getBottomRight() = 0;

        /**
         * @brief Draw itself on screen.
         **/
        virtual void evDraw(DrawEvent &event){}
    };

}

#endif // _YEP_ENGINE_DRAW_HANDLER_HPP

